import * as THREE from 'three';

//创建地面
const geometry = new THREE.PlaneGeometry(1000,1000);

// 创建纹理加载器对象
const loaderTex = new THREE.TextureLoader();
// 加载图片返回一个纹理对象
const texture = loaderTex.load('./zizhuan.jpg')
// 设置整列
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(10,10);
const material = new THREE.MeshBasicMaterial({ 
    // color: 0x00ffff,
    map: texture
})
// material.map = texture;


const mesh = new THREE.Mesh(geometry, material);
// 旋转-90°
mesh.rotateX(-Math.PI/2);


export default mesh;